import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from '@/App.vue'
import { router } from '@/router'
import store from './store'
// 引入自定义组件。index.js是组件的默认入口
import PugUI from '@/components/install'
import Loading from '@/plugins/PugLoading'
import PugPermission from '@/directives/PugPermission'


import 'virtual:windi.css'
import 'nprogress/nprogress.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)
app.use(router)
app.use(store)
app.use(PugPermission)
app.use(Loading)
app.use(PugUI)
app.use(ElementPlus)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.mount('#app')